package com.csun.cmny.provider.device.patrol;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2021/7/22 11:30
 * @Description: 巡更棒数据通道处理类
 */
@Component
public class PatrolNettyTcpChannelHandler extends ChannelInitializer<SocketChannel> {

    @Resource
    private PatrolNettyTcpServerHandler patrolNettyTcpServerHandler;

    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        socketChannel.pipeline().addLast(patrolNettyTcpServerHandler);
    }
}
